 
<template>
  <!-- 页面代码 -->
  节流指令使用：给 Dom 加上 v-throttle 及回调函数即可 
  <div>
    <el-row class="mb-4">
      <el-button>Default</el-button>
      <el-button type="primary" v-throttle="debounceClick">Primary</el-button>
      <el-button type="success" v-shake>Success</el-button>
      <el-button type="info">Info</el-button>
      <el-button type="warning">Warning</el-button>
      <el-button type="danger">Danger</el-button>
    </el-row>

    <el-row class="mb-4">
      <el-button plain>Plain</el-button>
      <el-button type="primary" plain>Primary</el-button>
      <el-button type="success" plain>Success</el-button>
      <el-button type="info" plain>Info</el-button>
      <el-button type="warning" plain>Warning</el-button>
      <el-button type="danger" plain>Danger</el-button>
    </el-row>

    <el-row class="mb-4">
      <el-button round>Round</el-button>
      <el-button type="primary" round>Primary</el-button>
      <el-button type="success" round>Success</el-button>
      <el-button type="info" round>Info</el-button>
      <el-button type="warning" round>Warning</el-button>
      <el-button type="danger" round>Danger</el-button>
    </el-row>
  </div>

  <!-- 组件声明 用于文字声明使用方法-->
  <div class="statement">
     
  </div>
  <!-- 组件声明 用于文字声明使用方法-->

  <!-- 页面代码 源码 -->
  <dropWrap>
    <pre><code class="language-html">{{ htm }} </code></pre>
  </dropWrap>
  <!-- 页面代码 源码 -->
</template>

<script lang="ts" setup>
import { ref, onMounted, nextTick } from "vue";
import Prism from "prismjs";
import "../../prism.css";

import dropWrap from "../../dropWrap.vue";
/* 响应式变量 */

//变量 htm 用于存放 组件源码 code
let htm = ref<string>(`
   <el-row class="mb-4">
      <el-button>Default</el-button>
      <el-button type="primary">Primary</el-button>
      <el-button type="success">Success</el-button>
      <el-button type="info">Info</el-button>
      <el-button type="warning">Warning</el-button>
      <el-button type="danger">Danger</el-button>
    </el-row>

    <el-row class="mb-4">
      <el-button plain>Plain</el-button>
      <el-button type="primary" plain>Primary</el-button>
      <el-button type="success" plain>Success</el-button>
      <el-button type="info" plain>Info</el-button>
      <el-button type="warning" plain>Warning</el-button>
      <el-button type="danger" plain>Danger</el-button>
    </el-row>

    <el-row class="mb-4">
      <el-button round>Round</el-button>
      <el-button type="primary" round>Primary</el-button>
      <el-button type="success" round>Success</el-button>
      <el-button type="info" round>Info</el-button>
      <el-button type="warning" round>Warning</el-button>
      <el-button type="danger" round>Danger</el-button>
    </el-row>
`);


const debounceClick=()=>{
  console.log("====")
}
/* 
生命周期
*/
onMounted(() => {
  nextTick(() => {
    Prism.highlightAll();
  });
});
</script>
<style lang="scss" scoped>
.el-row::v-deep {
  margin-bottom: 20px;
}
</style>
